import java.util.Arrays;

public class Students implements Comparable<Students> {
    public String name;
    public int age;

    public Students(String name, int age) {
        this.name = name;
        this.age = age;
    }

    @Override
    public String toString() {
        System.out.println();
        return "Stundents{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    @Override
    public int compareTo(Students o) {
        return this.age-o.age;
    }
}

